package hoang.android.app.item;

import hoang.android.app.R;
import android.content.Context;
import android.view.LayoutInflater;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class AddTripLayout extends LinearLayout{
	
	public TextView tvDate, tvEntryPoint, tvExitPoint, tvRate;
	public Button btRemove;

	public AddTripLayout(Context context, String date, String entryPoint, String ExitPoint, String rate, int trip_num) {
		super(context);
		
		LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		inflater.inflate(R.layout.item_add_trip, this);
		
		tvDate = (TextView)findViewById(R.id.tv_date);
		tvEntryPoint = (TextView)findViewById(R.id.tv_entry_point);
		tvExitPoint = (TextView)findViewById(R.id.tv_exit_point);
		tvRate = (TextView)findViewById(R.id.tv_rate);
		btRemove = (Button)findViewById(R.id.bt_remove);
		
		tvDate.setText(date);
		tvEntryPoint.setText(entryPoint);
		tvExitPoint.setText(ExitPoint);
		tvRate.setText(rate);
		btRemove.setTag(trip_num);
		
	}
}
